<?php
// +----------------------------------------------------------------------
// | admin后台路由
// +----------------------------------------------------------------------

use own\middleware\AdminMiddleware;
use think\facade\Route;

Route::group('admin', function() {
    /**
     * 业务配置
     */
    Route::group('configure', function() {
        /**
         * 地区管理
         */
        Route::group('district', function() {
            Route::get('list', 'getList');//列表
            Route::post('edit', 'edit');//编辑
            Route::post('status', 'status');//状态
            Route::get('info', 'info');//详情
            Route::post('import', 'import');//导入
            Route::get('option', 'option');//选项
        })->prefix('admin.configure.District/');
        /**
         * 应用图库
         */
        Route::group('map', function() {
            Route::get('list', 'mapList');//列表
            Route::post('edit', 'mapEdit');//编辑
            Route::post('status', 'mapStatus');//状态
            Route::post('delete', 'mapDelete');//删除
        })->prefix('admin.configure.Apply/');
        /**
         * 应用中心
         */
        Route::group('center', function() {
            Route::get('list', 'centerList');//列表
            Route::post('edit', 'centerEdit');//编辑
            Route::post('status', 'centerStatus');//状态
            Route::post('delete', 'centerDelete');//删除
        })->prefix('admin.configure.Apply/');
    });
    /**
     * 平台信息
     */
    Route::group('platform', function() {
        /**
         * 协议或文章
         */
        Route::group('agreement', function() {
            Route::get('list', 'agreementList');//列表
            Route::post('edit', 'agreementEdit');//编辑
        })->prefix('admin.platform.Platform/');
        /**
         * 用户反馈
         */
        Route::group('feedback', function() {
            Route::get('list', 'feedbackList');//列表
            Route::get('info', 'feedbackInfo');//详情
        })->prefix('admin.platform.Platform/');
    });
    /**
     * 会员
     */
    Route::group('member', function() {
        /**
         * 会员
         */
        Route::group('base', function() {
            Route::get('list', 'memberList');//列表
            Route::post('edit', 'memberEdit');//编辑
        })->prefix('admin.member.Member/');
    });
})->middleware(AdminMiddleware::class);
